
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 2
 * @Author : WangRuoyu 
 * @Date : 2023/5/10 15:00
 */

#include "iostream"
#include "cstring"
#include "algorithm"

using namespace std;

//0-670-82162-4
int main() {
    string str;
    cin >> str;

    char ch[11] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'X'};

    int sum = 0;
    char last = str[str.size()-1];

    int p = 1;
    for (int i = 0; i < str.size() - 2; ++i) {
        if (str[i] >= '0' && str[i] <= '9') {
            sum += p * (str[i] - '0');
            p++;
        }
    }

    if (ch[sum % 11] == last) {
        cout << "Right";
    } else {
        cout << str.substr(0, str.size() - 1) << ch[sum % 11];
    }

    return 0;
}